package com.dreamwhale.machinery.controller;


import com.dreamwhale.machinery.config.DataResult;
import com.dreamwhale.machinery.service.YxUserLevelService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 用户等级记录表 前端控制器
 * </p>
 *
 * @author Author
 * @since 2020-07-01
 */
@RestController
@RequestMapping("/yxUserLevel")
public class YxUserLevelController {

    @Resource
    private YxUserLevelService yxUserLevelService;

    @RequestMapping("inquiryVipInfo")
    /**
     * @MethodName : inquiryVipInfo
     * @Description : 查询vip信息
     * @param : request
     * @Author : DragonUncle
     * @Data : 18:45 2020/7/1
     * @return :
     */
    public DataResult inquiryVipInfo(HttpServletRequest request, String userId) {
//        Integer userId = Integer.parseInt(request.getAttribute("userId").toString());
        return new DataResult(yxUserLevelService.inquiryVipInfo(Integer.valueOf(userId)));
    }
}

